export default {
	data() {
		return {
			topHeight: 0,
		};
	},
	methods: {
		//获取顶部距离
		getTopHeight() {
			let that = this;
			uni.getSystemInfo({
				success: function(e) {
					//48为自定义导航栏高度，一般为44
					let topPx = e.statusBarHeight + 42 // 顶部状态栏+沉浸式自定义顶部导航
					that.topHeight = topPx / (uni.upx2px(topPx) / topPx) // px转rpx，这里必须转化为rpx，不然适配失败
				},
			});
		},
	}
};